<template>
	<view class="rencai">
		<view class="r1">
			<image :src="'http://124.93.196.45:10001'+detail.imgUrl"></image>
			<text>简介：{{detail.introduce}}</text>
		</view>
		<text style="font-size: 28px;">政策列表</text>
		<view class="r2" v-for="item in list" @click="tonext(item.id)">
			<text>{{item.title}}</text>
			<text>发布日期：{{item.createTime}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail:{},
				id:0,
				list:[]
			}
		},
		onLoad(options) {
			this.id=options.id
			this.getdetil()
			this.getlist()
		},
		methods: {
			getdetil(){
				this.api.get('/prod-api/api/youth-inn/talent-policy-area/'+this.id).then(res=>{
					this.detail=res.data.data
				})
			},
			getlist(){
				this.api.get('/prod-api/api/youth-inn/talent-policy/list?areaId='+this.id).then(res=>{
					this.list=res.data.data
				})
			},
			tonext(id){
				uni.navigateTo({
					url:'/pages/other/post/rencaidetail/rencaidetail?id='+id
				})
			}
		}
	}
</script>

<style lang="scss">
.r1{
	image{
		width: 100%;
		height: 175px;
	}
	margin-bottom: 20px;
}
.r2{
	width: 300px;
	margin: 20px auto;
	display: flex;
	flex-direction: column;
	border: 1px solid sandybrown;
	line-height: 28px;
}
</style>
